package com.szpx.service.impl;

import com.szpx.entity.lkyDispatch.Delivery;
import com.szpx.mapper.DeliveryMapper;
import com.szpx.service.DeliveryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeliveryServiceImpl implements DeliveryService {

    @Autowired
    private DeliveryMapper deliveryMapper;

    @Override
    public List<Delivery> getAllDeliveries() {
        return deliveryMapper.getAllDeliveries();
    }

    @Override
    public Delivery getDeliveryById(Long id) {
        return deliveryMapper.getDeliveryById(id);
    }

    @Override
    public void saveDelivery(Delivery delivery) {
        deliveryMapper.saveDelivery(delivery);
    }

    @Override
    public void updateDelivery(Delivery delivery) {
        deliveryMapper.updateDelivery(delivery);
    }

    @Override
    public void deleteDeliveryById(Long id) {
        deliveryMapper.deleteDeliveryById(id);
    }
}
